package com.sitechasia.webx.components.xtable.cell;

import org.extremecomponents.table.bean.Column;
import org.extremecomponents.table.cell.Cell;
import org.extremecomponents.table.core.TableModel;
import com.sitechasia.webx.components.xtable.customertag.CeColumnBuilder;

public class CeDefaultCell implements Cell {

	public String getExportDisplay(TableModel model, Column column) {
		return null;
	}

	public String getHtmlDisplay(TableModel model, Column column) {
		CeColumnBuilder columnBuilder = new CeColumnBuilder(column);
        columnBuilder.tdStart();
        columnBuilder.tdBody(getCellValue(model, column));
        columnBuilder.tdEnd();
        return columnBuilder.toString();
	}

	protected String getCellValue(TableModel model, Column column){
		return column.getValueAsString();
	}
}
